package kylin.dao.impl;

import java.util.List;

import kylin.base.dao.BaseDaoImpl;
import kylin.dao.DocInterfaceParamsDao;
import kylin.entity.DocInterfaceParams;

import org.springframework.stereotype.Repository;


@Repository
public class DocInterfaceParamsDaoImpl extends BaseDaoImpl<DocInterfaceParams> implements DocInterfaceParamsDao{

	/**
	 * <p>Method Name : query</p>
	 * <p>Method Desc : 根据方法名获取所有参数</p>
	 * <p>Date : 2015-11-6 上午1:35:38</p>
	 * <p>Author : XQL</p>
	 * @param docMethod_id
	 * @return
	 */
	public List<DocInterfaceParams> query(int docMethod_id){
		String hql = "from DocInterfaceParams where docInterfaceMethod.id = ?";
		return super.findByHQL(hql, docMethod_id);
	}

	/**
	 * <p>Description : 根据方法ID删除方法下的参数</p>
	 * <p>Author : XQL</p>
	 * <p>Date : 2016/3/23 17:00</p>
	 */
	public boolean deleteByMethod(int docMethod_id){
		String hql = "delete from DocInterfaceParams where docInterfaceMethod.id = ?";
		return super.executeHQL(hql,docMethod_id);
	}
}
